// server.js
const express = require('express')
const cors = require('cors')

const app = express()
const port = 5000

app.use(cors())

app.get('/api/data', (req, res) => {
  const data = [
    { day: '星期一', morning: '面包', noon: '披萨', evening: '西餐' },
    { day: '星期二', morning: '包子', noon: '中餐', evening: '中餐' },
    { day: '星期三', morning: '面条', noon: '汉堡', evening: '火锅' },
  ]
  res.json(data)
})

app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}`)
})

// const timeSetting = require('../timeSetting/timeSetting')
// const express = require('express')
// const cors = require('cors')

// const app = express()
// const port = 5000

// app.use(cors())

// app.get('/api/form-data', (req, res) => {
//   res.json({ columns: formColumnsLast, data: formDataLast })
// })

// app.listen(port, () => {
//   console.log(`Server running at http://localhost:${port}`)
// })
